<template>
  <div>
      <van-row>
           <van-col span="4" style="text-align:right; background:pink"></van-col>
        <van-col span="20"> <seheade/> </van-col>
      </van-row>
      <van-row>
        <van-col span="4"> <celan/> </van-col>
        <van-col span="4"> <relp /> </van-col>
        <van-col span="16">
            <table style="width:600px">
            <tr>
                <td><van-radio-group v-model="radio" direction="horizontal">
                <van-radio name="1" shape="square"></van-radio>
                </van-radio-group></td>
                <td>账号</td>
                <td>姓名</td>
                <td>性别</td>
                <td>手机号</td>
                <td>邮箱</td>
                <td>工号</td>
                <td>状态</td>
                <td>操作</td>
            </tr>
            <tr v-for="i in dicts" :key="i">
                <td><van-radio-group v-model="radio" direction="horizontal">
                <van-radio :name="i.id" shape="square"></van-radio>
                </van-radio-group></td>
                <td>{{i.username}}</td>
                <td>{{ i.name }}</td>
                <td>{{get_geder(i.geter)}}</td>
                <td>{{i.phone}}</td>
                <td>{{i.email}}</td>
                <td>{{i.jobnum}}</td>
                <td>{{get_type(i.user_type)}}</td>
                <td><van-button>编辑</van-button></td>
            </tr>
            </table>
            <div>
                <!-- <van-popup v-model:show="shows"> -->
                <div style="width: 500px;height: 300px;font-size: 15px;padding: 10px">
                <van-field placeholder="请输入账号" label="账号:" v-model="username"></van-field>
                <van-field placeholder="请输入密码" label="密码:" v-model="password"></van-field>
                <van-field placeholder="请输入确认密码" label="确认密码:" v-model="passwords"></van-field>
                <van-field placeholder="请输入姓名" label="姓名:" v-model="name"></van-field>
                <van-radio-group v-model="geter" direction="horizontal">
                    <van-radio name="1">男</van-radio>
                    <van-radio name="2">女</van-radio>
                </van-radio-group>
                <van-field placeholder="请输入手机号" label="手机号:" v-model="phone"></van-field>
                <van-field placeholder="请输入邮箱" label="邮箱:" v-model="email"></van-field>
                <van-field placeholder="请输入工号" label="工号:" v-model="jobnum"></van-field>
                <van-button @click="que_user">确认</van-button>
                </div>
                <!-- </van-popup> -->
            </div>
        </van-col>
      </van-row>
  </div>
</template>

<script>
import seheade from './sellheader.vue'
import celan from './celan_zi.vue'
import relp from './repl_zi.vue'
import myaxios from 'axios'
export default {
    components:{
        seheade,
        celan,
        relp
    },
    data(){
        return{
            list:[],
            filterText:'',
            dicts:[],
            dict:{1:'正常',2:'冻结'},
            geder:{1:'男',2:'女'},
            radio:'',
            shows:true,
            geter:1,
            username:'',
            password:'',
            phone:'',
            email:'',
            jobnum:'',
            name:'',
        }
    },
  methods:{
    que_user(){
      this.myaxios("http://localhost:5000/post_user", 'post',
          {
            'geter':this.geter,
            'username':this.username,
            'password':this.password,
            'passwords':this.passwords,
            'phone':this.phone,
            'email':this.email,
            'jobnum':this.jobnum,
            'name':this.name,
          })
          .then(res => {
            console.log(res)
            this.$toast.fail(res.data.msg)
            this.shows=false

          })
    },
  }

}
</script>

<style>

</style>